In time series data visualization, the importance lies in presenting temporal patterns and trends in a clear and comprehensible manner. Effective visualization allows analysts and decision-makers to extract meaningful insights from the data, aiding in better understanding the dynamics of a system over time. The choice of visualization techniques is crucial, as it directly influences the interpretation of patterns within the time series.
The ability to discern seasonality, identify anomalies, and recognize patterns is vital for making informed predictions and strategic decisions. Furthermore, interactive features in visualizations enable users to delve deeper into the data, offering a dynamic and exploratory experience.
Ultimately, the clarity and accuracy of time series data visualization contribute significantly to enhancing decision-making processes across various domains, such as finance, healthcare, environmental monitoring and many other areas.
The plot above shows the stock price trends of Disney (DIS), Microsoft (MSFT), and Netflix (NFLX) from 2013 to 2024. Overall, these stock prices exhibit an upward trend. In particular, Netflix saw a rapid rise in stock price from 2016 to 2020, with its price reaching twice that of Microsoft in 2021. However, in 2022, the stock prices of all three companies declined, especially Netflix, which saw a sharp drop followed by a slight recovery. This could be related to the post-pandemic decrease in consumer demand, particularly for Netflix’s video content. Compared to Netflix and Microsoft, Disney’s stock price remained relatively lower and more stable.
Code
#plotly# candlestick plotgetSymbols("ETH-USD", from ="2024-04-01", to ="2024-05-01")
Ethereum (ETH) is a decentralized cryptocurrency widely used in blockchain technology. The candlestick plot above shows the price trend of ETH-USD during April 2024. Each candlestick represents four price points: Open, Close, High, and Low. The color of the candlestick typically indicates whether the price has gone up (green) or down (red) within a day. In April, ETH’s price fluctuated significantly, reaching a high of $3727 and a low of $2815 on May 1. Although the price experienced fluctuations, the overall trend showed a decline.
Hover over the interactive plot to see the difference.
Code
library(dotenv)library(fredr)fredr_set_key(trimws(Sys.getenv("FRED_API_KEY")))gdp_data <-fredr(series_id ="GDP", observation_start =as.Date("2013-01-01"), observation_end =as.Date("2024-12-31"))fig <- gdp_data %>%plot_ly(x =~date, y =~value, type ='scatter', mode ='lines', line =list(color ='blue')) %>%layout(title ='US GDP',subtitle ='From 2013-2024',xaxis =list(title ='Date'),yaxis =list(title ='GDP in Billions of USD'))fig
U.S. GDP (Gross Domestic Product) reflects the overall size and growth of the U.S. economy. The plot above shows the quarterly GDP of the U.S. from 2013 to 2024. It is evident that the U.S. GDP has generally shown steady growth, indicating the continuous expansion of the U.S. economy during this period, with inflation contributing to this growth. However, at the beginning of 2020, the GDP saw a significant decline due to the global pandemic, but it gradually recovered during the subsequent economic rebound.